#import <Foundation/Foundation.h>
#import <objc/runtime.h>

#import "framework/FWCommon.h"

#import "PIEventStatus.h"

NSString* const kPIEventOptionsViewStyle = @"viewStyle";
NSString* const kPIEventOptionsShowCalendar = @"isShowCalendar";
NSString* const kPIEventOptionsDaySummary = @"daySummary";
NSString* const kPIEventOptionsFutureOnly = @"isFutureEventsOnly";
NSString* const kPIEventOptionsShowPastEvents = @"isShowPastEvents";
NSString* const kPIEventOptionsShowAvailability = @"isShowAvail";

NSInteger const kPIEventOptionsViewStyleDefault = kPIEventViewStyleTimeAtEnd;
BOOL const kPIEventOptionsShowCalendarDefault = NO;
NSInteger const kPIEventOptionsDaySummaryDefault = kPIEventDaySummaryStyleEventsOnly;
BOOL const kPIEventOptionsFutureOnlyDefault = NO;
BOOL const kPIEventOptionsShowPastEventsDefault = NO;
BOOL const kPIEventOptionsShowAvailabilityDefault = YES;


@implementation PIEventStatus

@synthesize itemsReturnedCount, nextChangeDue, nextAlarmDue, shownDialHelp, mapViewType, showCalendar, daySummaryStyle, showListDetails, showAvailability;
@synthesize itemsFilteredCount, itemsWithDetailsCount, showEmoji, lowColour, shortDates, showIcons, singleLineOniPad, viewStyle, lastListRefresh, showSourceIcons;


// ******************************************************************************************
#pragma mark -
#pragma mark Initialisation and object management

- (id)init
{
    if ((self = [super init])) {
        self.itemsReturnedCount = 0;
        self.itemsFilteredCount = 0;
        self.itemsWithDetailsCount = 0;
        
        self.showEmoji = YES;
        self.lowColour = YES;
        
        self.singleLineOniPad = NO;
        self.viewStyle = kPIEventViewStyleTraditional;

        self.shortDates = -1;
        self.showIcons = YES;
        self.showCalendar = YES;
        
        self.nextChangeDue = [NSDate date];
        self.nextAlarmDue = nil;
        
        self.lastListRefresh = [NSDate nullDate];
    }
    
    return self;
}

- (void)dealloc
{
    [nextAlarmDue release];
    [nextChangeDue release];
    [lastListRefresh release];
    
    [super dealloc];
}

@end
